package com.yanqu.road.entity.banquet;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * 用户宴会关系,只涉及本服私宴的关系，参加次数和被参加次数
 */
public class UserBanquetSetting extends DataObject {

    /**
     * 对应的用户
     */
    private long userId;

    private int type;
    private String giftTypeAccept;//1,2,3用逗号分隔的字符串
    private long updateTime;
    private String banquetId;

    public UserBanquetSetting(long userId, int type, String giftTypeAccept, long updateTime) {
        this.userId = userId;
        this.type = type;
        this.giftTypeAccept = giftTypeAccept;
        this.updateTime = updateTime;
        this.banquetId = "";
    }

    public long getUserId() {
        return userId;
    }

    public int getType() {
        return type;
    }

    public String getGiftTypeAccept() {
        return giftTypeAccept;
    }

    public void setGiftTypeAccept(String giftTypeAccept) {
        if (!Objects.equals(this.giftTypeAccept, giftTypeAccept)) {
            this.giftTypeAccept = giftTypeAccept;
            this.setUpdateOption();
        }
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        if (this.updateTime != updateTime) {
            this.updateTime = updateTime;
            this.setUpdateOption();
        }
    }

    public String getBanquetId() {
        return banquetId;
    }

    public void setBanquetId(String banquetId) {
        if (!Objects.equals(this.banquetId, banquetId)) {
            this.banquetId = banquetId;
            this.setUpdateOption();
        }
    }
}
